/**
 * 
 */
package com.etrans.web.gps.common;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>Title: 5.5平台全局常量<／p>
 * <p>Description: 常量定义，整个平台公用的常量都在此定义<／p>
 * <p>Copyright: Copyright (c) 2007<／p>
 * <p>Company: E-trans<／p>
 * 
 * @author R.Lao
 * @date 2017年6月13日
 * @time 上午8:56:12
 * @version 1.0
 */
public class Constant {
	
	public static final int RETURN_ERROR_CODE = -1;

	public static final int RETURN_OK_CODE = 0;
	
	public static final int CHECK_THE_SAME_NAME=2;//检查是否同名
	
	public static final int SEND_CMD_TIME_OUT = -2;//查岗指令发送超时 
	
	public static final int RETURN_Repent_CODE=1;

	public static final String INSERT = "INSERT";

	public static final String UPDATE = "UPDATE";
	
	public static final String enum_ROLE_STATE = "ROLE_STATE";

	public static final String enum_FUNCTION_STATE = "FUNCTION_STATE";

	public static final String enum_FUNCTION_TYPE = "FUNCTION_TYPE";

	public static final String enum_dictionaryIsValid = "dictionaryIsValid";
	
	public static final byte C_GPS_FlAG_ACC = 0x01;			//ACC状态
	
	public static final byte C_GPS_FlAG_VALID = 0x02;		//定位状态
	
	/**
	 * 日期格式
	 */
	public static final String YYYY_MM_DD_HH_MM_SS_FORMAT = "yyyy-MM-dd hh:MM:ss";
	
	/**
	 * 登陆用户SESSION
	 */
	public static final String LOGIN_SESSION_NAME="login_user";
	
	/**
	 * 登陆用户的菜单
	 */
	public static final String USER_OP_MENU = "login_user_op_menu";
	
	/**
	 * 车辆id密匙
	 */
	public static final int VEHICLE_PASS_KEY =24987 ;
	
	/**
	 * 报警声音开关状态
	 */
	public static final String ALARM_VOICE_STATE = "alarm_voice_state";
	public final static String FROMNUMBER = "fromNumber";
	
	/**
	 * 所要查询的每页的记录数
	 */
	public static final String PAGE_SIZE = "pageSize";
	
	/**
	 * 所要查询的当前页数
	 */
	public static final String PAGE = "page";
	
	/**
	 * JSON格式的参数字符串，做为执行SQL语句中的order排序的条件
	 */
	public static final String ORDER_PARAM = "orderParam";
	
	/**
	 * JSON格式的的参数字符串，做为执行SQL语句中的where的条件
	 */
	public static final String WHERE_PARAM = "whereParam";
	
	
	/**
	 * 车牌账号功能角色功能
	 */
	public final static String VehicleUserFunctionCode = "2706";
	/**
	 * 车牌账号数据权限编号
	 */
	public final static String VehicleDataRight="40";
	
	/**
	 * 升序
	 */
	public static final int MONGODB_ASC = 1;
	/**
	 * 倒序
	 */
	public static final int MONGODB_DESC = -1;

	public static final String SEPARATOR_COMMA = null;
	/**
	 * 报警来源
	 */
	public static final Map<Integer,String>  ALARM_SRC = new HashMap<Integer,String>();
	static {
		ALARM_SRC.put(1, "车载终端");
		ALARM_SRC.put(2, "企业监控平台");
		ALARM_SRC.put(3, "政府监管平台");
		ALARM_SRC.put(9, "车载终端");
	}
	/**
	 * 处警处理内容
	 */
	public static final Map<Integer,String>  ALARM_HANDLE_RESULT = new HashMap<Integer,String>();
	static {
		ALARM_SRC.put(0, "处理中");
		ALARM_SRC.put(1, "已处理完毕");
		ALARM_SRC.put(2, "不做处理");
		ALARM_SRC.put(3, "将来处理");
	}
}
